
package edu.wpi.first.wpilibj.templates.subsystems;

import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.CANJaguar;
import edu.wpi.first.wpilibj.can.CANTimeoutException;
import edu.wpi.first.wpilibj.templates.HardwareMap;

/**
 *
 */
public class Lifter extends Subsystem {
    // Put methods for controlling this subsystem
    // here. Call these from Commands.

    CANJaguar Motor;
    
    private static final int POLARITY = 1;
    
    public Lifter(){
        super("Lifter");
        try {
            Motor = new CANJaguar(HardwareMap.LIFT_JAGUAR);
            Motor.setSafetyEnabled(false);

        }
        catch (CANTimeoutException e){
            e.printStackTrace();
        }
    }
    public void initDefaultCommand() {
        // Set the default command for a subsystem here.
        //setDefaultCommand(new MySpecialCommand());
    }
    public void Move(double Speed){
        try {
            Motor.setX(POLARITY*Speed);
        }
        catch (CANTimeoutException e){
            e.printStackTrace();
        }  
    }
}

